package com.xm.ojbackendjudge.controller.inner;

import com.xm.ojbackendjudge.judge.JudgeService;
import com.xm.ojbackendmodel.model.entity.QuestionSubmit;
import com.xm.ojbackendservice.service.JudgeFeignClient;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * 内部feign调用接口
 */
@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeignClient {

    @Resource
    private JudgeService judgeService;

    @PostMapping("/do")
    @Override
    public QuestionSubmit doJudge(@RequestParam("questionSubmitId") long questionSubmitId) {
        return judgeService.doJudge(questionSubmitId);
    }
}
